<include file="Public/min-header" />
<div class="wrapper">
	<include file="Public/breadcrumb"/>
	<section class="content">
       <div class="row">
       		<div class="col-xs-12">
	       		<div class="box">
	             <div class="box-header">
              		<nav class="navbar navbar-default">				
	               		<div class="pull-right navbar-form">
	               			<label><a class="btn btn-block btn-primary" href="{:U('Admin/Ad/space')}">新增广告位</a></label>
	               		</div>
	               	</nav>	            
	             </div>
	             <div class="box-body">
		           <div class="row">
		            	<div class="col-sm-12">
			              <table id="list-table" class="table table-bordered table-striped dataTable" role="grid" aria-describedby="example1_info">
			                 <thead>
			                   <tr role="row">
			                   	   <th>广告位ID</th>
				                   <th>广告位名称</th>
				                   <th>广告位宽度</th>
				                   <th>广告位高度</th>
				                   <th>状态</th>
				                   <th>操作</th>
			                   </tr>
			                 </thead>
							<tbody>
							  <foreach name="list" item="vo" key="k" >
							  	<tr role="row">
							  	 <td>{$vo.id}</td>
			                     <td>{$vo.name}</td>
			                     <td>{$vo.width}</td>
			                     <td>{$vo.height}</td>
			                     <td>
                                     <img width="20" height="20" src="__COMMON__/img/<if condition='$vo[is_open] eq 1'>yes.png<else />cancel.png</if>" onclick="changeTableVal('ad_space','id','{$vo.id}','is_open',this)"/>                                                                
                                             </td>
			                     <td>
			                      <a class="btn btn-primary" href="{:U('Admin/Ad/space',array('act'=>'edit','space_id'=>$vo['id']))}"><i class="fa fa-pencil"></i></a>
			                      <a class="btn btn-danger" onclick="delfunc(this)" data-url="{:U('Ad/spaceHandle')}" data-id="{$vo.id}"><i class="fa fa-trash-o"></i></a>
			                      <a class="btn btn-info" href="{:U('Admin/Ad/adList',array('pid'=>$vo['id']))}"><i class="fa fa-eye"></i></a>
			                     
								</td>
			                   </tr>
			                  </foreach>
			                   </tbody>
			               </table>
		               </div>
		          </div>
		         	
	              <div class="row">
	                    <div class="col-sm-12">
	                    	<div class="page">{$page}</div>
	                    </div>		
	              </div>
	          </div>
	        </div>
       	</div>
       </div>
   </section>
</div>
</body>
</html>